﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharePoint2007Migration.Costants;
using SharePoint2007Migration.Domain;

namespace SharePoint2007Migration
{

    public class MissingSetupFileIssue : BaseIssue
    {

        string _filename;
        public MissingSetupFileIssue(IBaseIssue issue)
            : base(issue.Text)
        {

        }

        public string FileName 
        {
            get
            {
                if (_filename == null)
                    _filename = Get_filename();
                return _filename;
 
            }
        }

        private string Get_filename()
        {
            return ExtractAndCleanupStringFromMessage(RegexCostants.REGEX_SETUPFILE_FILENAME, "File [", "]");
        }
    }
}
